 |
 |
 |
 |
 |
|
|
 |
A simple
program
|
|
Preprocessor
directive
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
This line is
read "pound
|
|
include
i-o-stream dot h".
|
|
The effect of
this line is to
|
|
essentially
"copy and
|
|
paste" the
entire file
|
|
iostream.h into your own
|
|
file at this
line. So you can
|
think of this
syntax as
|
|
replacing the
line #include
|
|
<iostream.h> with the
|
|
contents of the
file
|
|
iostream.h. #include is
|
|
known as a preprocessor
|
|
directive.
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
//include
this file for cout
|
|
#include
<iostream.h>
|
|
|
int
main()
|
|
{
|
|
//print out the text string,
|
//"Hello, World!"
|
|
cout << "Hello, World!"
|
|
<< endl;
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|